<!DOCTYPE html>
<html>

<head>

    {include file="Public:header"}
</head>

<body style="color:#333;padding:3px;">
<!-- 标题 -->
<div class="page-heade">
    <h1 class="title_color">销售订单列表</h1>
</div>
<!-- 标题 -->
<div class="form-inline">
    <form action="">
        <table class="row-margin-top tab-content table-bordered table text-left" border="1">
            <tr>
                <td style="min-width: 120px" class="text-right"><label for="" class="form-label">分区：</label></td>
                <td><input type="text" class="form-control" name="zoning" value="{$zoning}"></td>
                <td style="min-width: 120px" class="text-right"><label for="" class="form-label">省份：</label></td>
                <td><input type="text" class="form-control" name="provice" value="{$provice}"></td>
                <td style="min-width: 120px" class="text-right"><label for="" class="form-label">城市：</label>
                </td>
                <td><input type="text" class="form-control" name="city" value="{$city}"></td>
                <td style="min-width: 120px" class="text-right"><label for="" class="form-label">订单号：</label></td>
                <td><input type="text" class="form-control" name="ordersn" value="{$ordersn}"></td>
            </tr>
            <tr>
                <td style="min-width: 120px" class="text-right"><label for="" class="form-label">申请人：</label></td>
                <td><input type="text" class="form-control" name="sqrmc" value="{$sqrmc}"></td>
                <td style="min-width: 120px" class="text-right"><label for="" class="form-label">经销商名称：</label>
                </td>
                <td><input type="text" class="form-control" name="jxsname" value="{$jxsname}"></td>
                <td style="min-width: 120px" class="text-right"><label for="" class="form-label">时间段：</label>
                </td>
                <td>
                    <div class="form-group">
                        <input type="text" id="start" class="form-control layer-date "
                               style="min-width: 100px;width: 100px; height: 26px;display: inline-block;" name="start" value="{$start}">
                    </div>
                    <div class="form-group">
                        到
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control layer-date"
                               style="min-width: 100px;width: 100px; height: 26px;display: inline-block;" id="end" name="end" value="{$end}">
                    </div>
                </td>
            </tr>
            <tr>
                <td style="min-width: 120px" class="text-right"><label for="" class="form-label">申请状态：</label>
                </td>
                <td>
                    <select name="applyStatus" id="" class="form-control">
                        <option value="">请选择</option>
                        <option value="1" {if $applyStatus==1}selected{/if}>已批准</option>
                        <option value="2" {if $applyStatus==2}selected{/if}>未批准</option>
                    </select>
                </td>
                <td style="min-width: 120px" class="text-right"><label for="" class="form-label">发货状态：</label>
                </td>
                <td>
                    <select name="fhzt" id="" class="form-control">
                        <option value="">请选择</option>
                        <option value="0" {if $fhzt=='0'}selected{/if}>未发货</option>
                        <option value="1" {if $fhzt=='1'}selected{/if}>部分发货</option>
                        <option value="2" {if $fhzt=='2'}selected{/if}>发货完毕</option>
                    </select>
                </td>
                <td style="min-width: 120px" class="text-right"><label for="" class="form-label">金额(元)范围：</label>
                </td>
                <td colspan="3">
                    从<input type="text" class="form-control" style="min-width: 100px;width: 100px;height: 26px"
                            name="minNum" value="{$minNum}">
                    到<input type="text" class="form-control" style="min-width: 100px;width: 100px;height: 26px"
                            name="maxNum" value="{$maxNum}">
                </td>
            </tr>
            <tr>
                <td colspan="8" class="text-center">
                    <button class="btn btn-info query" type="submit">查询</button>
                    <button class="btn btn-info emptyIf" type="button">清空</button>
                </td>
            </tr>
        </table>

        <table class="table row-margin-top table-bordered table-hover text-center bud_hei">
            <tr class="info text-center">
                <th class="text-center">No.</th>
                <th class="text-center">分区</th>
                <th class="text-center">省份</th>
                <th class="text-center">城市</th>
                <th class="text-center">时间</th>
                <th class="text-center">订单号</th>
                <th class="text-center">申请人</th>
                <th class="text-center">经销商名称</th>
                <th class="text-center">申请状态</th>
                <th class="text-center">发货状态</th>
                <th class="text-center">金额(元)</th>
                <th class="text-center">操作</th>
            </tr>
            <tbody>
            {volist name="data" id="row" key="k"}
            <tr>
                <td>{$k}</td>
                <td>{$row.zoning}</td>
                <td>{$row.provice}</td>
                <td>{$row.city}</td>
                <td>{:date('Y-m-d',$row.sqrq)}</td>
                <td><a href="{:url('wdxsdd/view',['id'=>$row.id])}" class="J_menuItem">{$row.sn}</a></td>
                <td>{$row.sqrmc}</td>
                <td>{$row.cusName}<span class="glyphicon glyphicon-ok duigou" title="已生效" aria-hidden="true"></span></td>
                <td>{$row.status}</td>
                <td>{if $row.fhzt=='1'}部分发货{elseif $row.fhzt=='2'}发货完毕{else}未发货{/if}</td>
                <td class="ObjectNum">{$row.je}</td>
                <td><a href="{:url('wdxsdd/cklct',['id'=>$row.id])}" class="J_menuItem">查看流程</a></td>
            </tr>
            {/volist}
            </tbody>
        </table>
        <h5 class="text-center">
            {$page}
        </h5>
    </form>
</div>
<!-- 全局js -->
{include file="Public:footer"}

<!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
<script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script src="__STATIC__/layout/js/common.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script>
    $(document).ready(function () {
        $('.emptyIf').on('click',function () {
            $(this).closest('form').find('input').val('')
            $(this).closest('form').find('select').val('')
            $(this).closest('form').submit()
        })
        var $ObjectNum = $(".ObjectNum");
        toNum($ObjectNum);
    })
    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY/MM/DD',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY/MM/DD',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
</script>
</body>

</html>
 